@page "/Ranged_Column_Chart"

<AntDesign.Charts.Column Data=data1 Config="config1" />

<Divider>动手实验</Divider>
<DynamicExample @ref="@example">
    <AntDesign.Charts.Column @ref="@chart" />
</DynamicExample>

@code{

    public IChartComponent chart;
    DynamicExample example;

    protected override void OnAfterRender(bool firstRender)
    {
        base.OnAfterRender(firstRender);
        example.Chart = chart;
    }


    #region 示例1

    object[] data1 = new object[] {
        new  { type= "分类一", values= new int[]{76, 100 } },
        new  { type= "分类二", values=  new int[]{56, 108 } },
        new  { type= "分类三", values= new int[]{38, 129 } },
        new  { type= "分类四", values=  new int[]{58, 155 } },
        new  { type= "分类五", values= new int[]{45, 120 } },
        new  { type= "分类六", values=  new int[]{23, 99 } },
        new  { type= "分类七", values= new int[]{18, 56 } },
        new  { type= "分类八", values= new int[]{18, 34 } },
};

    ColumnConfig config1 = new ColumnConfig()
    {
        XField = "type",
        YField = "values",
        IsRange = true,
        Label = new ColumnViewConfigLabel()
        {
            Position = "middle",
            Layout = new []
            {
                new LayoutType()
                {
                    Type = "adjust-color"
                }
            }
        }
    };

    #endregion 示例1


}

